<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAddressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('addresses', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('[v1.0]用户id');
            $table->string('name')->nullable()->comment('[v1.0]姓名');
            $table->string('tel')->nullable()->comment('[v1.0]联系电话');
            $table->double('latitude')->nullable()->comment('[v1.0]纬度');
            $table->double('longitude')->nullable()->comment('[v1.0]经度');
            $table->string('community')->nullable()->comment('[v1.0]所在小区');
            $table->string('address_name')->nullable()->comment('[v1.0]位置名');
            $table->string('details')->nullable()->comment('[v1.0]详情地址');           
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('addresses');
    }
}
